package Z.dailyExercise.holiday;

public class _剑指Offer65_不用加减乘除做加法 {
    /**
     * 考察位运算
     * @param a
     * @param b
     * @return
     */
    public int add(int a, int b) {

        while (b!=0){
            int temp = a&b<<1;
            a ^= b;
            b = temp;
        }

        return a;

    }
}
